from flask import Flask,Blueprint
from flask_cors import CORS

from apis.stable_diffusion import sd_bp
from apis.ask import chat_bp
from apis.friendList import friendList_bp
from apis.history import history_bp
from apis.addFriend import addFriend_bp

app = Flask(__name__)
app.register_blueprint(sd_bp)
app.register_blueprint(chat_bp)
app.register_blueprint(friendList_bp)
app.register_blueprint(history_bp)
app.register_blueprint(addFriend_bp)


CORS(app, resources={r"/*": {"origins": "*", "supports_credentials": True}})
if __name__ == '__main__':
    app.run(debug=True, host="0.0.0.0", port=5000)